/**
 * @description: 解析域名
 */

import { defHttp } from '@/apis/http'
import type { CommonAPI } from '@/apis/schema/all'

/** 更新解析域名 */
export const updateApiResolveDomainApi: CommonAPI<
  '/api/resolve/domain',
  'put'
> = (data) => defHttp.put(`/api/resolve/domain`, { data })

/** 创建解析域名 */
export const addApiResolveDomainApi: CommonAPI<
  '/api/resolve/domain',
  'post'
> = (data) => defHttp.post(`/api/resolve/domain`, { data })

/** 删除解析域名 */
export const deleteApiResolveDomainApi: CommonAPI<
  '/api/resolve/domain',
  'delete'
> = (data) => defHttp.delete(`/api/resolve/domain`, { data })

/** 查询解析域名 */
export const getApiResolveDomainsApi: CommonAPI<
  '/api/resolve/domains',
  'get'
> = (params) => defHttp.get(`/api/resolve/domains`, { params })
